package com.chen10.cattle.mapper;

import com.chen10.cattle.model.pojo.GameRecords;
import com.chen10.cattle.model.vo.GameRecordsVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface GameRecordsMapper {
    /**
     * 插入游戏记录
     * @param gameRecords
     */
    void insertGameRecord(GameRecords gameRecords);

    /**
     * 获取用户的对战记录总数
     * @param userId
     * @return
     */
    int getCountsByUserId(Integer userId);

    /**
     * 分页查询用户的对战列表
     * @param userId
     * @param offset
     * @param size
     * @return
     */
    List<GameRecordsVO> getPageByUserId(Integer userId, int offset, int size);
}




